@charset "utf-8";


*{
	margin: 0;
	padding: 0;
	font-size: 50px;
}

body{
	background: url(../img/bgbg.jpg);
	background-size: cover;/* 覆盖整个视口 */
	background-repeat: no-repeat;
	background-attachment: fixed;
	animation: bgMove 10s linear infinite;
	min-height: 100vh;/* 让body高度至少占满整个视口高度 */
	margin: 0;/* 清楚默认边距 */
	
}
/* 小马宝莉 */
.horse{
	width: 170px;
	height: 200px;

	background: url(../img/1.png);
	background-size: 100% 100%;
	position: relative;
	top: 458px;
	left: 100px;
	animation: horse 10s linear infinite;
}
.sun{
	width: 300px;
	height: 300px;
	background: url(../img/sun.png);
	background-size: 100% 100%;
	position: relative;
	top: -650px;
	animation: sun 5s linear infinite;
}
.cloud{
	width: 450px;
	height: 350px;
	background: url(../img/cloud.png);
	background-size: 100% 100%;
	position: relative;
	top: -350px;
	animation: cloud 10s linear infinite;
}
.butterfly{
	width: 80px;
	height: 80px;
	position: absolute;
	top: 400px;
	left: 200px;
	animation: fly 10s linear infinite;
}
.flower{
	width: 800px;
	height: 480px;
	background: url(../img/flower.gif);
	background-size: 100% 100%;
	position: relative;
	top: -641px;
	left: 650px;
	animation: flower 10s linear infinite;
}

/* 关键帧--小马*/
@keyframes horse{
	0%{
		top: 458px;
		left: 10px;
	}
	10%{
		left: 10px;
		background: url(../img/1.png);
		background-size: 100% 100%;
	}
	20%{
		left: 110px;
		background: url(../img/2.png);
		background-size: 100% 100%;
	}
	30%{
		left: 210px;
		background: url(../img/3.png);
		background-size: 100% 100%;
	}
	40%{
		left: 310px;
		background: url(../img/4.png);
		background-size: 100% 100%;
	}
	50%{
		left: 410px;
		background: url(../img/5.png);
		background-size: 100% 100%;
	}
	60%{
		left: 510px;
		background: url(../img/6.png);
		background-size: 100% 100%;
	}
	70%{
		left: 610px;
		background: url(../img/7.png);
		background-size: 100% 100%;
	}
	80%{
		left: 710px;
		background: url(../img/8.png);
		background-size: 100% 100%;
	}
	90%{
		left: 810px;
		background: url(../img/9.png);
		background-size: 100% 100%;
	}
	100%{
		left: 910px;
		background: url(../img/1.png);
		background-size: 100% 100%;
	}
}
/* 关键帧-背景 */
@keyframes bgMove{
	0%{
		background-position: 0 0;/* 初始位置 */
	}
	100%{
		background-position: -450px 0;/* 向右移动200px */
	}
}
/* 云 */
@keyframes cloud{
	0%{
		left: -450px;/* 初始位置在画面左侧外 */
	}
	100%{
		left: 100%;/* 最终位置在画面最右侧 */
	}
}
/* 蝴蝶 */
@keyframes fly{
	0%{
	    top: 400px;
	    left: 200px;
		transform: scale(1);
	}
	20%{
		top: 500px;
		left: 400px;
		transform: scale(1.25);
	}
	40%{
		top: 300px;
		left: 600px;
		transform: scale(.8);
	}
	60%{
		top: 400px;
		left: 800px;
		transform: scale(1.25);
	}
	80%{
		top: 500px;
		left: 1000px;
		transform: scale(1);
	}
	100%{
		top: 300px;
		left: 1200px;
		transform: scale(1.25);
	}
}
/* 太阳 */
@keyframes sun{
	0%{
		transform: rotate(0);
	}
	100%{
		transform: rotate(360deg);
	}
}